package com.lovo.doudizhu;

import java.util.Comparator;

public class MyComparator implements Comparator<Card> {


    @Override
    public int compare(Card o1, Card o2) {
        if (o1.getNumber() < o2.getNumber()) {
            return 1;//交换
        } else if (o1.getNumber() > o2.getNumber()) {
            return -1;//不交换
        } else {
            return 0;//不交换
        }
    }
}
